<%@ page language="java" import="java.util.*,javabean.data.User" pageEncoding="utf-8"%>
<jsp:useBean id="u" class="javabean.data.UserRegisterBean" scope="session"/>
<html>
  <head>   
    <title></title>
  </head>  
  <body>
  <!-- 第一种方式 -->
 <%--  <%
  	request.setCharacterEncoding("utf-8");
  	String name=request.getParameter("name");
  	String sex=request.getParameter("sex");
  	String age=request.getParameter("age");
  	String adress=request.getParameter("adress");
  	int rage=Integer.parseInt(age);
  	u.setName(name);
  	u.setSex(sex);
  	u.setAge(rage);
  	u.setAdress(adress);
  %>  --%>
  
  <!-- 第二种方式 -->
  <%request.setCharacterEncoding("utf-8"); %>
  <jsp:setProperty name="u" property="*"/>
  
  <p>姓名：<jsp:getProperty name="u" property="name"/></p>
  <p>性别：<jsp:getProperty name="u" property="sex"/></p>
  <p>年龄：<jsp:getProperty name="u" property="age"/></p>
  <p>住址：<jsp:getProperty name="u" property="adress"/></p>
  
  </body>
</html>
